package events;

/**
 * Event is the base class for all other event classes. This basic class
 * contains two primary variables, the time the event occurs at and the type of
 * event being processed.
 * 
 * @author Team Switchboard Boxcar
 * @see Car_Accident
 * @see Car_Arrival
 * @see Generate_Travelers
 * @see Rain
 * @see Train_Arrival
 */
public class Event {
	
	private int OccurenceTime;
	private int EventID;

	/**
	 * This Event Constructor is the Basic Constructor for each Event. It takes
	 * in no inputs setting both the time and ID to imaginary values. This
	 * constructor is not traditionally used as it will set the internal
	 * variables to imaginary values.
	 * 
	 */
	public Event() 
	{
		OccurenceTime = -1;
		EventID = -1;
	}

	/**
	 * This Event Constructor takes in two inputs for the Event class. This is
	 * the primary constructor that should be called when creating any event.
	 * 
	 * @param ID
	 *            The ID ( 1 - 5) representing the type of Event that is being
	 *            processed.
	 * @param Time
	 *            The time that the event occurs in minutes since the beginning
	 *            of the simulation.
	 * 
	 */
	public Event(int ID, int Time) 
	{
		EventID = ID;
		OccurenceTime = Time;
	}

	/**
	 * SetTime is the function that can be called to update the time of a specific
	 * event.   
	 * 
	 * @param Time The updated time that the event occurs at.
	 */
	public void SetTime(int Time) 
	{	OccurenceTime = Time;	}

	/**
	 * GetTime is the function that can be called to return the time an event
	 * occurs.
	 * 
	 * @return Returns the at which an event occurs. This time is a measurement
	 *         of minutes since the beginning of the simulation.
	 */
	public int GetTime() 
	{	return OccurenceTime;	}

	/**
	 * GetEffect returns an EventID for the specific event. This can be used to
	 * distinguish between the 5 seperate event types.
	 * <br>
	 * 1 = {@link Car_Accident}
	 * <br>
	 * 2 = {@link Car_Arrival}
	 * <br>
	 * 3 = {@link Generate_Travelers}
	 * <br>
	 * 4 = {@link Rain}
	 * <br>
	 * 5 = {@link Train_Arrival}
	 * @return EventID  This returns the type of event that occurs.
	 * 					Event ID
	 * 
	 */
	public int GetEffect() 
	{	return EventID;	}

}